Vibathon Project

Architecture & File Plan: FlowState Studio

1. High-Level Architecture

FlowState Studio will be a single-page React app built with Vite + TypeScript + Tailwind CSS, running entirely in the browser. All session data (start/end time, activity, mood, soundtrack) is stored in localStorage, so there’s no backend or auth to worry about. The core of the app is a “session state machine”: idle → running → stopped → saved-to-timeline.

At the UI level, we’ll have a main AppShell that wraps everything in a CRT-style, neon-glow frame: the big timer area (“Deck”), a control strip for start/stop, and a scrollable “Vibe Reel” timeline of previous sessions. A lightweight global state (via React context or a top-level state in App.tsx) will manage the current active session and the list of stored sessions, with a small abstraction around localStorage to keep persistence logic clean.

Styling is handled by Tailwind plus a small global CSS layer for CRT scanlines, glow, and glitchy transitions. Components stay small and focused: timer, form, list, list item card, and some reusable “vibe” UI primitives (glowing buttons, badges, panels). This keeps the codebase approachable and hackathon-friendly while still looking visually impressive.

2. File & Folder Structure

flowstate-studio/
├─ index.html
├─ package.json
├─ tsconfig.json
├─ vite.config.ts
├─ postcss.config.cjs
├─ tailwind.config.cjs
└─ src/
   ├─ main.tsx
   ├─ App.tsx
   ├─ types/
   │  └─ session.ts
   ├─ context/
   │  └─ SessionContext.tsx
   ├─ components/
   │  ├─ layout/
   │  │  └─ AppShell.tsx
   │  ├─ sessions/
   │  │  ├─ SessionTimer.tsx
   │  │  ├─ SessionForm.tsx
   │  │  ├─ SessionList.tsx
   │  │  └─ SessionCard.tsx
   │  └─ ui/
   │     ├─ GlowButton.tsx
   │     ├─ VibeBadge.tsx
   │     └─ Panel.tsx
   ├─ hooks/
   │  ├─ useSessionTimer.ts
   │  └─ useLocalStorage.ts
   ├─ lib/
   │  ├─ storage.ts
   │  └─ time.ts
   └─ styles/
      └─ index.css

3. Responsibilities Per Main File / Folder

Root / Config

src/main.tsx

src/App.tsx

src/types/session.ts

src/context/SessionContext.tsx

We can keep this fairly small; the heavy lifting for timing lives in useSessionTimer.

src/components/layout/AppShell.tsx

src/components/sessions/SessionTimer.tsx

src/components/sessions/SessionForm.tsx

src/components/sessions/SessionList.tsx

src/components/sessions/SessionCard.tsx

src/components/ui/GlowButton.tsx

src/components/ui/VibeBadge.tsx

src/components/ui/Panel.tsx

src/hooks/useSessionTimer.ts

src/hooks/useLocalStorage.ts

src/lib/storage.ts

src/lib/time.ts

src/styles/index.css